home *** CD-ROM | disk | FTP | other *** search
- /*Objective_C Implementation of the RPNCalculator Class: RPNCalculator.m*/
-
- //EXERCISE: IMPLEMENT EACH OF THE METHODS BELOW
-
- #import <stdio.h>
- #import "RPNCalculator.h"
-
- @implementation RPNCalculator
-
- //Initialize a new RPNCalculator instance
- -init
- {
-
- }
- // Enter a number
-
- -(float)enter:(float)number
- {
-
- }
-
- //Add new entry
- -(float)add:(float)number
- {
-
- }
-
- //Add two elements
- -(float)add
- {
-
- }
-
- //Subtract new entry
- -(float)subtract:(float)number
- {
-
- }
-
- //Subtract two elements
- -(float)subtract
- {
-
- }
-
- // Print the calculator's stack
- -printStack
- {
-
- }
-
- // Empty the calculator's stack
- -allClear
- {
-
- }
-
- // Free the calculator and its stack
- -free
- {
-
- }
-
- @end
-